package com.hzlh.controller;

import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hzlh.log.MethodLog;
import com.hzlh.service.LogService;

@Controller
@RequestMapping("log")
public class LogController {
	
	@Autowired
	private LogService logService;
 
	@MethodLog(key="LOG.LIST")
	@RequiresPermissions("log:list")
	@RequestMapping("/page")
	@ResponseBody
	public Map<String,Object> page(@RequestParam(value="userName",required=false)String userName,
			int pageIndex,int pageSize){
		return logService.page(userName, pageIndex, pageSize);
	}
	
}